package com.zxb.service;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.web.client.RestTemplate;

import com.zxb.pojo.Item;

@Service
public class ItemService {
	@Autowired
	private RestTemplate restTemplate;
	public Item queryItemById(Long id){
		Item item= restTemplate.getForObject("http://localhost:8083/item/"+id, Item.class);
		return item;
	}

}
